package com.adcc.loadsheet.billing.mapper.mysql.permission;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 合同用户和权限关联表Mapper
 * Created by zhaoml on 2020-09-22.
 */
@Mapper
public interface ContractUserPermissionEntityMapper {

    //查询与合同用户绑定的权限
    List<Integer> selectPermissionIds(Integer contractUserId);

    //根据合同用户删除
    int deleteByContractUserId(Integer contractUserId);

    //批量新建合同用户-权限关联关系
    void insertByBatch(@Param("contractUserId") Integer contractUserId, @Param("functionPermissionIds") String functionPermissionIds);
}